(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
int(0, 0) → .(0, nil)
int(0, s(y)) → .(0, int(s(0), s(y)))
int(s(x), 0) → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(x, y)) → .(s(x), int_list(y))
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
int(0', 0') → .(0', nil)
int(0', s(y)) → .(0', int(s(0'), s(y)))
int(s(x), 0') → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(x, y)) → .(s(x), int_list(y))
S is empty.
Rewrite Strategy: FULL
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
./0
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
int(0', 0') → .(nil)
int(0', s(y)) → .(int(s(0'), s(y)))
int(s(x), 0') → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(y)) → .(int_list(y))
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
int(0', 0') → .(nil)
int(0', s(y)) → .(int(s(0'), s(y)))
int(s(x), 0') → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(y)) → .(int_list(y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
int,
int_listThey will be analysed ascendingly in the following order:
int_list < int
(8) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
int_list, int
They will be analysed ascendingly in the following order:
int_list < int
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
int_list(
gen_nil:.3_0(
n6_0)) →
gen_nil:.3_0(
n6_0), rt ∈ Ω(1 + n6
0)
Induction Base:
int_list(gen_nil:.3_0(0)) →RΩ(1)
nil
Induction Step:
int_list(gen_nil:.3_0(+(n6_0, 1))) →RΩ(1)
.(int_list(gen_nil:.3_0(n6_0))) →IH
.(gen_nil:.3_0(c7_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
int
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
int(
gen_0':s4_0(
n184_0),
gen_0':s4_0(
n184_0)) →
gen_nil:.3_0(
1), rt ∈ Ω(1 + n184
0)
Induction Base:
int(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
.(nil)
Induction Step:
int(gen_0':s4_0(+(n184_0, 1)), gen_0':s4_0(+(n184_0, 1))) →RΩ(1)
int_list(int(gen_0':s4_0(n184_0), gen_0':s4_0(n184_0))) →IH
int_list(gen_nil:.3_0(1)) →LΩ(2)
gen_nil:.3_0(1)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
int(gen_0':s4_0(n184_0), gen_0':s4_0(n184_0)) → gen_nil:.3_0(1), rt ∈ Ω(1 + n1840)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(15) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
(16) BOUNDS(n^1, INF)
(17) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
int(gen_0':s4_0(n184_0), gen_0':s4_0(n184_0)) → gen_nil:.3_0(1), rt ∈ Ω(1 + n1840)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
(19) BOUNDS(n^1, INF)
(20) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
(22) BOUNDS(n^1, INF)